/*class MyArray {
    public Object[] array = new Object[10];

    public void setValue(int pos,Object val) {
        array[pos]=val;
    }
    public Object getValue(int pos) {
        return array[pos];
    }
}*/
/*

class MyArray<T> {
    //public T[] array = new T[10];
    public Object[] array = new Object[10];

    public void setValue(int pos,T val) {
        array[pos]=val;
    }
    public T getValue(int pos) {
        return (T)array[pos];
    }
}


public class Test2 {
    public static void main(String[] args) {
        MyArray<T> myArray = new MyArray();
        myArray.setValue(0,12);



        System.out.println(myArray.getValue(0));
    }
}
*/
/*

class MyArray<T>{
    public Object[] array = new Object[10];

    public void setValue(int pos,Object val) {
        array[pos] = val;
    }

    public T getValue(int pos) {
        return (T)array[pos];
    }
}
public class Test2 {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setValue(0,1);
        myArray.setValue(1,2);
        z【puiuttttteint a = myArray.getValue(1);
        System.out.println(a);

        MyArray<String> myArray2 = new MyArray<>();
        myArray2.setValue(0,"hello");
        myArray2.setValue(1,"world");
        String ret1 =  myArray2.getValue(0);
        String ret2 =  myArray2.getValue(1);

        System.out.println(ret1);
        System.out.println(ret2);
    }
}
*/
/*

class MyArray<T>{
    Object[] array = new Object[10];
     void setValue(int pos,T val) {
         array[pos] = val;
     }
     T getValue(int pos) {
         return (T)array[pos];
     }
}
public class Test2 {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setValue(0,1);
        myArray.setValue(1,2);
        System.out.println(myArray.getValue(0));
        System.out.println(myArray.getValue(1));
    }
}
*/

class MyArray<T> {
    Object[] array = new Object[10];
    public void setValue(int pos,T val) {
        array[pos] = val;
    }
    public T getValue(int pos) {
        return (T)array[pos];
    }
}
public class Test2 {
    public static void main(String[] args) {
        MyArray<String>myArray = new MyArray<>();
        myArray.setValue(0,"abc");
        myArray.setValue(1,"def");
        String ret1 = myArray.getValue(0);
        String ret2 = myArray.getValue(1);
        System.out.println(ret1);
        System.out.println(ret2);
    }
}















